﻿using System;
using System.Threading.Tasks;
using Sino.CarGoCome.Core;
using Sino.CarGoCome.Model;
using Sino.CapacityCloud.WebApi;

namespace Sino.CarGoCome.VirtualCoreData
{
    public class MockUserService : IUserService
    {
        public async Task<UserInfoResponse> GetUserInfoAsync()
        {
            return new UserInfoResponse()
            {
                Info = new UserInfo()
                {
                    Address = "江苏",
                    AuthorizedLoad = 20,
                    CarLength = "13.3米",
                    CarNumber = "苏A 99999",
                    CarriageType = CarriageType.SA,
                    CarType = "平板",
                    HeadImage = @"http://7xiiiw.com1.z0.glb.clouddn.com/Logo.png",
                    Point = 9,
                    Profile = "模拟数据",
                    UserName = "18600001111",
                    RealName = "测试名",
                    RealNameState = RealNameState.Pass
                }
            };
        }

        public async Task<VoidResponse> PutUserInfoAsync(UserInfo info)
        {
            return new VoidResponse();
        }

        public async Task<RealNameInfoResponse> GetRealNameInfoAsync()
        {
            return new RealNameInfoResponse()
            {
                Info = new RealNameInfo()
                {
                    DrivingLicenseImage = @"http://7xiiiw.com1.z0.glb.clouddn.com/Logo.png",
                    DrivingLicenseState = RealNameState.Pass,
                    RealHeadImage = @"http://7xiiiw.com1.z0.glb.clouddn.com/Logo.png",
                    RealHeadState = RealNameState.Pass,
                    IDCardImage = @"http://7xiiiw.com1.z0.glb.clouddn.com/Logo.png",
                    IDCardState = RealNameState.Pass,
                    VehicleLicenseImage = @"http://7xiiiw.com1.z0.glb.clouddn.com/Logo.png",
                    VehicleLicenseState = RealNameState.Pass
                }
            };
        }

        public async Task<MyRatingInfoResponse> GetMyRatingAsync()
        {
            return new MyRatingInfoResponse()
            {
                Ratings = new[]
                {
                    new OrderRating()
                    {
                        Attitude = 8,
                        Comment = "模拟评价",
                        Date = DateTime.Now,
                        Integrity = 9,
                        Name = "调度员",
                        Timeliness = 9,
                        TotalPoint = 8.9,
                        TransPrice = 8
                    },
                    new OrderRating()
                    {
                        Attitude = 8,
                        Comment = "模拟评价",
                        Date = DateTime.Now,
                        Integrity = 9,
                        Name = "调度员",
                        Timeliness = 9,
                        TotalPoint = 9,
                        TransPrice = 8
                    },
                    new OrderRating()
                    {
                        Attitude = 8,
                        Comment = "模拟评价",
                        Date = DateTime.Now,
                        Integrity = 9,
                        Name = "调度员",
                        Timeliness = 9,
                        TotalPoint = 10,
                        TransPrice = 8
                    },
                    new OrderRating()
                    {
                        Attitude = 8,
                        Comment = "模拟评价",
                        Date = DateTime.Now,
                        Integrity = 9,
                        Name = "调度员",
                        Timeliness = 9,
                        TotalPoint = 5,
                        TransPrice = 8
                    },
                    new OrderRating()
                    {
                        Attitude = 8,
                        Comment = "模拟评价",
                        Date = DateTime.Now,
                        Integrity = 9,
                        Name = "调度员",
                        Timeliness = 9,
                        TotalPoint = 6,
                        TransPrice = 8
                    }

                }
            };
        }

        public async Task<PutRealNameInfoResponse> PutRealNameInfoAsync(RealNameType type, string imageUri)
        {
            return new PutRealNameInfoResponse() { IsSuccessed = true, Message = "模拟修改" };
        }

        public async Task<PutRealNameInfoResponse> BatchPutRealNameInfoAsync(string carCode, string drivingLicenseKey, string idCardKey, string realHeadKey, string vehicleLicenseKey)
        {
            return new PutRealNameInfoResponse() { IsSuccessed = true, Message = "模拟修改" };
        }

    }

}